#!/bin/bash
port_list="81 2222 3389"
for i in ${port_list} ; do
   if [[ ! `ss -nlpt | grep -w :${i}` ]] ; then
      exit 1
   fi
done
exit 0